<h1>Editing post</h1>

<%= error_messages_for :post %>

<% form_for(@post) do |f| %>
	<p>
			<%= f.label :title %>
			<%= f.text_field :title %>
	</p>
	<p>
			<%= f.text_area :content %>
	</p>
	<p>
	  <%= f.label :book_id %>
	  <%= f.collection_select :book_id, Book.find(:all), :id, :title %>
	</p>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', @post %> |
<%= link_to 'Back', posts_path %>
